package com.lhj.bootdemo.designmode.factory.idcard;

import com.lhj.bootdemo.designmode.factory.framework.Factory;
import com.lhj.bootdemo.designmode.factory.framework.Product;

import java.util.ArrayList;
import java.util.List;

/**
 * @author lhj
 * @version 1.0
 * @date 2022/4/5 11:55 上午
 * @description:
 */

public class MyIDCardFactory extends Factory {

    private List owners = new ArrayList();
    @Override
    protected Product creatProduct(String owner) {
        return new MyIDCard(owner);
    }

    @Override
    protected void registerProduct(Product product) {
        owners.add(product);
    }

    public List getOwners() {
        return owners;
    }

    public void setOwners(List owners) {
        this.owners = owners;
    }
}
